import java.util.Random;

public class 评委打分 {
    public static void main(String[] args) {
        Random r = new Random();
        int[] arr = new int[6];
        for (int i = 0; i < arr.length; i++) {
            arr[i] = r.nextInt(101);
        }
        int findMax = arr[0];
        int findMin = arr[0];
        int sum = 0;
        for (int i = 0; i < arr.length; i++) {
            if (findMax < arr[i]) {
                findMax = arr[i];
            }
            if (findMin > arr[i]) {
                findMin = arr[i];
            }
            sum += arr[i];
        }
        int avg = (sum - findMax - findMin) / (arr.length - 2);
        System.out.println("最高分为：" + findMax);
        System.out.println("最低分为：" + findMin);
        System.out.println("平均分是：" + avg);
    }
}
